﻿//
// $HeadURL: http://codeka-memcache.googlecode.com/svn/trunk/Codeka.Memcache/StoreMode.cs $
// $Revision: 9 $
// $Author: dean.codeka $     $Date: 2010-02-21 00:55:37 +0000 (Sun, 21 Feb 2010) $
//
// Copyright © 2009-2010 Dean Harding, all rights reserved.
//

namespace Codeka.Memcache
{
    /// <summary>
    /// When storing a value, this is used to determine whether we do
    /// an "add" (fail if the key exists), "replace" (fail if the key does
    /// not exist) or "set" (don't care if the key already exists).
    /// </summary>
    public enum StoreMode
    {
        /// <summary>
        /// Add the value to the cache, fail if it already exists.
        /// </summary>
        Add,

        /// <summary>
        /// Replace an existing value, fail if it does not exist.
        /// </summary>
        Replace,

        /// <summary>
        /// Set a value in the cache, whether it exists already or not.
        /// </summary>
        Set
    }
}
